const defaultState = {
    visible: false,
    loading: false,
    ids: [],
    model: {"currency": "无需转换"},
    rateData: []
};
export default function partExport(state = defaultState, action) {
    const {type, payload} = action;
    switch (type) {
        case 'ZAD_ORDER_RECEIVABLE.SHOW_PART_EXPORT':
            return {...state, visible: true, model: {"currency": "无需转换"}, ids: payload, rateData: []};
        case 'ZAD_ORDER_RECEIVABLE.HIDE_PART_EXPORT':
            return {...state, visible: false, ids: [], rateData: []};
        case 'ZAD_ORDER_RECEIVABLE.UPDATE_RATE_DATA':
            return {...state, rateData: [...payload]};
        case 'ZAD_ORDER_RECEIVABLE.EXPORT_PENDING':
        case 'ZAD_ORDER_PAYABLE.EXPORT_PENDING':
            return {...state, loading: true};
        case 'ZAD_ORDER_RECEIVABLE.EXPORT':
        case 'ZAD_ORDER_PAYABLE.EXPORT':
            return {...state, loading: false};
        default:
            return state;
    }
}

